package com.chenyaowei.happyhub.service;

import com.chenyaowei.happyhub.mapper.AccountMapper;
import com.chenyaowei.happyhub.pojo.GoodsPojo.Good;
import com.chenyaowei.happyhub.pojo.wechatuser.Account;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class AccountServiceImpl implements AccountService {
    @Resource
    AccountMapper accountMapper;

    @Override
    public PageInfo selectAccount(int pageNum, int pageSize, String keyword) {
        PageHelper.startPage(pageNum, pageSize);
        List<Account> allOrderPresentList = accountMapper.selectAccount(keyword);
        PageInfo<Account> pageInfo = new PageInfo<>(allOrderPresentList);
        return pageInfo;
    }

    @Override
    public void updateAccount(String isLogin, String isPay, String id) {
        accountMapper.updateAccount(isLogin, isPay, id);
    }
}

